/*
 * File Name : user.h
 * Auther : dream.liuguobiao
 * Create Date : 2010-5-11
 * Last Edit : 2010-5-14
 */

#ifndef USER_H
#define USER_H

#include <string>
#include <vector>
#include "group.h"

class group;

class user
{
private:
  std::string name;
  std::string password;
  int ID;
  user *next_user;
  std::vector<group *> groups;

public:
  user( std::string new_name  );
  user( std::string new_name , int new_ID);
  ~user();
  std::string *get_name();
  int get_ID();
  bool set_ID(int new_ID);
  std::vector<group *>* get_groups();
  bool remove_group( group *delete_group );
  bool insert_group( group *insert_group );
  user *get_next_user();
  bool set_next_user(user *new_user);
  std::string *get_password();
  bool set_password( std::string *new_password);
};

#endif
